package com.ruicar.afs.cloud.voucher.feign;

import com.alibaba.fastjson.JSONObject;
import com.ruicar.afs.cloud.common.core.feign.annotations.AfsFeignClear;
import com.ruicar.afs.cloud.voucher.dto.VoucherItemDto;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author infinity
 * @version 1.0
 * @description: 对接长城凭证中间库
 * @date 2020/7/2 9:54
 */
@FeignClient(name = "voucherItem", url = "${com.greatwall.systems.voucher-system-item.url}")
public interface VoucherItemApiFeign {

    @ApiOperation("发送凭证辅助帐中间库API接口")
    @PostMapping(value = "/send")
    @AfsFeignClear(true)
        //通过此注解防止添加内部token
    JSONObject send(@RequestBody @Validated VoucherItemDto dto);

}
